package com.xbongbong.saas.domain.dao;

import com.xbongbong.saas.domain.entity.SelectedExpressEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface SelectedExpressDao {
    Long insert(SelectedExpressEntity entity);

    void insertBatch(List<SelectedExpressEntity> list);

    SelectedExpressEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid);

    Integer update(SelectedExpressEntity entity);

    List<SelectedExpressEntity> findEntities(@Param("param") Map<String, Object> param);

    Integer getEntitiesCount(@Param("param") Map<String, Object> param);

    void updateBatchDel(@Param("list") List<Long> list, @Param("corpid") String corpid);

    void updateBatchToDel(@Param("list") List<Long> list, @Param("corpid") String corpid);

    /**
     * 批量更新实体
     * @param list
     * @param corpid
     * @return 返回数据的列表
     */
    Integer updateBatch(@Param("list") List<SelectedExpressEntity> list, @Param("corpid") String corpid);
}